package stud.mpgame.snapshot;

import java.util.LinkedList;

public class SnapshotCommands {
	private ISnapshot snapshot;
	private LinkedList < ICommand > commands;
	
	public SnapshotCommands(ISnapshot snapshot, LinkedList < ICommand > commands) {
		this.snapshot = snapshot;
		this.commands = commands;
	}

	public SnapshotCommands(ISnapshot snapshot) {
		this.snapshot = snapshot;
		this.commands = new LinkedList < ICommand >();
	}
	
	public ISnapshot getSnapshot() {
		return snapshot;
	}
	
	public LinkedList < ICommand > getCommands() {
		return commands;
	}
	
	public SnapshotCommands modelNext (int deltaTime, LinkedList < ICommand > nextCommands) {
		return new SnapshotCommands(snapshot.modelNext(deltaTime, commands), nextCommands);
	}
	
	public SnapshotCommands modelNext (int deltaTime) {
		return new SnapshotCommands(snapshot.modelNext(deltaTime, commands));
	}

}
